package com.tang.model.adpater.login;

/**
 * Created by Tom.
 */
public class LoginService {

    /**
     * 注册方法
     * @param username
     * @param password
     * @return
     */
    public ResultMsg regist(String username,String password){

        /**
         * 先判断用户名是否已经存在，若存在则不需要进行注册
         */
//        if (checkUsername(username)){
//            return  new ResultMsg(200,"已有注册",new Member());
//        }
        if (true){
            return  new ResultMsg(200,"已有注册",new Member());
        }

        return  new ResultMsg(200,"注册成功",new Member());
    }

    /**
     * 登录的方法
     * @param username
     * @param password
     * @return
     */
    public ResultMsg login(String username,String password){

        return  new ResultMsg(200,"登录成功",new Member(username,password));
    }

}
